There are conventionally proposed information processing apparatuses which generate an image observed from an arbitrary viewpoint in a virtual 3D space by generating an object (article) existing in a virtually set 3D space by using the CG (Computer Graphics) technology, thereby presenting virtual reality. Especially in an information processing apparatus that measures the position/orientation of the user's head and sets it as the observation viewpoint in a virtual 3D space, the image changes as if the apparatus user himself/herself observed the virtual 3D space following the motion of his/her head. For this reason, the user of the apparatus can devote himself/herself to the virtual 3D space.
In order to give the apparatus user a sense closer to the reality, such an apparatus is technically required to realize high-speed image generation processing and improve the quality of a generated image. As a means for solving the problems, a technique called environment mapping is known. Environment mapping is a technique to express reflection of the ambient environment on a virtual object. This technique is disclosed in Blinn, J. F. and Newell, M. E., “Texture and reflection in computer generated images”, Communications of the ACM, Vol. 19, No. 10 (October 1976), pp. 542-547.
In environment mapping, an environment mapping image as an image of the ambient environment which should be reflected on a virtual object is prepared in advance. The environment mapping image is mapped as a texture on the virtual object to reflect it. At this time, an area of the environment mapping image which is to be mapped on the virtual object is determined on the basis of a reflection vector calculated from the observation viewpoint of the virtual object and the normal to the vertex of the virtual object. By this method, an expression can be obtained as if the virtual object reflected the ambient environment.
Another example of the method of implementing the same expression by CG is ray tracing. Ray tracing traces a beam striking a virtual object from the viewpoint and obtains the intersection to the beam. This technique is disclosed in, Turner Whitted, “An improved illumination model for shaded display”, Communications of the ACM, Vol. 23, No. 6 (June 1980), pp. 343-349.
Environment mapping can execute processing at higher speed than ray tracing and is therefore used especially widely in apparatuses requiring real-time processing for virtual reality presentation or computer games. On the other hand, environment mapping is often poorer than ray tracing in ensuring the accuracy of reflection expression because it substantially aims at simply expressing reflection on a virtual object.
Environment mapping assumes that the position and direction of a viewpoint and the position of a virtual object do not change, and a mapping area in an environment mapping image changes in accordance with rotation of a virtual object. If the position of a virtual object changes, or a virtual object is observed while changing the viewpoint position/orientation, the assumption cannot apply. For this reason, the change of virtual object reflection is unnatural, making the apparatus user feel discomfort.
A system described in U.S. Pat. No. 6,850,242 reduces discomfort by rotating the normal vector of a virtual object.
In the conventional method, however, when a virtual object at rest is observed while changing the roll component (the rotation component of the viewpoint about the line of sight) of the viewpoint orientation, reflection on the virtual object changes although it should not change. This phenomenon occurs on the basis of the assumption of environment mapping that the virtual object is rotated while fixing the line-of-sight direction.
An example will be examined in which a reflection object 20 and non-reflection objects 30 are observed from a viewpoint 10, as shown in FIG. 15. An environment mapping image shown in FIG. 16 is mapped on the reflection object 20.
FIG. 17 shows an image obtained by applying environment mapping to the reflection object 20 and observing the reflection object 20 and non-reflection objects 30 from the viewpoint 10 when the roll angle of the viewpoint 10 is 0°. In FIG. 17, a reflection 50 on the object 20 is correctly expressed.
FIG. 18 shows an image obtained by applying environment mapping when the roll angle of the viewpoint 10 is −20°. The reflection 50 must not change with respect to the reflection object 20, as shown in FIG. 19. However, in the conventional environment mapping method, a line-of-sight vector 15 does not change even when the roll angle of the line of sight changes. Hence, texture mapping is executed on the reflection object 20 in the same way as for the roll angle of 0°. That is, the reflection 50 forms the same image as that for the roll angle of 0°, as shown in FIG. 18.
As described above, the image of the reflection object 20 conventionally rotates relatively in a direction reverse to the roll angle (i.e., +20° in FIG. 18), and the reflection cannot be expressed correctly. That is, when the roll angle of the viewpoint 10 is changed, the reflection 50 is observed as if it moved with respect to the reflection object 20 at rest.
When the reflection object 20 and non-reflection objects 30 rotate about the line-of-sight vector 15 without changing the roll angle of the viewpoint 10, the image shown in FIG. 18 is correct, and correct reflection can be expressed by the conventional environment mapping.